package com.example.mapper;

import com.example.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;



@Mapper //此注解表示该项是一个mybatis的mapper
@Repository //添加此注解,才可以在其他地方进行autowired
public interface DepartmentMapper {

    //查询所有部门信息
    List<Department> getAllDepartments();

    //根据id查询部门信息
    Department getDepartmentById(Integer id);
}
